package com.hm.jiaowuxitong.dao;

import com.hm.jiaowuxitong.util.DBUtil;

import java.util.List;
import java.util.Map;

public class ClassDaoImp implements IClassDao {

    @Override
    public int insertClass(Map<String, Object> oMap) {
        return DBUtil.jt.update("insert into 班级表 values(?,?,?,?,?)",
                new Object[]{

                        oMap.get("personId"),
                        oMap.get("name"),
                        oMap.get("age"),
                        oMap.get("sex"),
                        oMap.get("studyMoney"),
                });
    }


    @Override
    public List<Map<String, Object>> selectClasses() {
        return DBUtil.jt.queryForList("select * from 班级表");
    }
}
